package com.tfjybj.itoo.exam.provider.service.impl;

import com.dmsdbj.itoo.tool.base.service.impl.BaseServicePlusImpl;
import com.tfjybj.itoo.exam.entity.EvaluationPaperDetailEntity;
import com.tfjybj.itoo.exam.model.EvaluationPaperDetailModel;
import com.tfjybj.itoo.exam.model.EvaluationRecordModel;
import com.tfjybj.itoo.exam.provider.dao.EvaluationPaperDetailDao;
import com.tfjybj.itoo.exam.provider.service.EvaluationPaperDetailService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * TeEvaluationPaperDetailService接口实现类
 * ${base}表
 *
 * @author 杨江涛
 * @version 2.0.0
 * @since 2.0.0 2018-12-18 18:19:48
 */
@Service("teEvaluationPaperDetailService")
public class EvaluationPaperDetailServiceImpl extends BaseServicePlusImpl<EvaluationPaperDetailDao, EvaluationPaperDetailEntity> implements EvaluationPaperDetailService {
	
	//region 模板生成

    @Resource
    private EvaluationPaperDetailDao evaluationPaperDetailDao;

    /**
     * 查询问卷试题详情-题干与各个选型对应关系
     * @param paperId 问卷id
     * @return 题干与各个选型对应关系
     * @author 杨晓慧
     * @since 2.0.0 2018-12-27 08:48:44
     */
    @Override
    public List<EvaluationPaperDetailModel> queryTeEvaluationPaperDetail(String paperId) {
        return evaluationPaperDetailDao.queryTeEvaluationPaperDetail(paperId);
    }


    /**
     * 查询问卷下所有单选题和多选题题干
     * @param paperId 问卷id
     * @return 问卷下所有单选题和多选题题干
     * @author 杨晓慧
     * @since 2.0.0 2018-12-28 08:48:44
     */
    @Override
    public List<EvaluationPaperDetailModel> queryRadioAndCheckQuestion(String paperId) {
         return evaluationPaperDetailDao.queryRadioAndCheckQuestion(paperId);
    }


    @Override
    public List<EvaluationRecordModel> queryStudentEvaluationRecord(String paperId, String courseId, String studentId, String schoolYearId) {
        return evaluationPaperDetailDao.queryStudentEvaluationRecord( paperId, courseId, studentId, schoolYearId);
    }

    //endregion

    /* **********************************以下为非模板生成的内容********************************* */

    /**
     * 根据问卷id查询问卷绑定关系表的信息
     * @param paperId 问卷id
     * @return 问卷绑定关系
     * @author 杨江涛
     * @since 2019-1-15 20:32:41
     */
    @Override
    public List<EvaluationPaperDetailModel> queryDetailInfo(String paperId) {
        return evaluationPaperDetailDao.queryDetailInfo(paperId);
    }
}
